package cn.wolfcode.crm.service.impl;

import cn.wolfcode.crm.domain.SaleAccount;
import cn.wolfcode.crm.mapper.SaleAccountMapper;
import cn.wolfcode.crm.query.SaleChartObjectQuery;
import cn.wolfcode.crm.service.ISaleAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SaleAccountServiceImpl implements ISaleAccountService{

    @Autowired
    private SaleAccountMapper saleAccountMapper;
    @Override
    public void save(SaleAccount saleAccount) {
        saleAccountMapper.insert(saleAccount);
    }

    @Override
    public List<Map<String,Object>> listSaleChart(SaleChartObjectQuery qo) {
        return saleAccountMapper.selectAll(qo);
    }
    @Override
    public List<Map<String,Object>> selectAllToIndex(SaleChartObjectQuery qo) {
        return saleAccountMapper.selectAllToIndex(qo);
    }
}
